#include "template_match.h"
#include "templateprocess.h"
#include "error-info.h"


static TemplateProc gTemplate_processer;

int Init(const char* template_file_name)
{
	return 
	gTemplate_processer.Init(template_file_name);
}

int Process(const UserCommand* command, UserCommandInfo* command_info_result)
{
	int ret = 0;
#ifdef _DEBUG
	Timer timer;
#endif // _DEBUG
	ret = gTemplate_processer.Process(command, command_info_result);
#if 0
	double elapsed = timer.Elapsed();
	std::cout << "Time taken " << elapsed
		<< "s: real-time factor assuming commands/sec is "
		<< (ret / elapsed) << std::endl;
	std::cout << "Done " << ret << " utterances, failed for "
		<< num_fail << std::endl;

#endif
	return ret;
}


int Stop()
{
	int ret = gTemplate_processer.Stop();
	return ret;
}
